package com.itheima.controller.oms;


import com.itheima.core.R;
import com.itheima.pojo.oms.OmsCompanyAddress;
import com.itheima.service.oms.OmsCompanyAddressService;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/companyAddress")
public class OmsCompanyAddressController {

    @DubboReference
    private OmsCompanyAddressService omsCompanyAddressService;

    /*获取所有收货地址*/
    @GetMapping("list")
    public R listAll(){

        List<OmsCompanyAddress> listAll = omsCompanyAddressService.list();
        return R.success("",listAll);

    }
}
